package com.boot.mall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserRegisterVo {

    @NotEmpty(message = "用户名不能为空")
    private String userName;    //用户名

    @NotEmpty(message = "密码不能为空")
    @Length(min = 6,max = 18,message = "密码长度在6-18为之间")
    private String password;    //密码

    @NotEmpty(message = "邮箱地址不能为空")
    @Pattern(regexp = "[1-9][0-9]{4,}@qq.com",message = "邮箱格式不正确")  //只是判断了QQ邮箱，这是QQ邮箱正则
    private String email;   //邮箱地址

    @NotEmpty(message = "验证码不能为空")
    private String code;    //验证码

}
